/****************************************************************************************
 * Copyright (c) 2010~2012 All Rights Reserved by
 * G-Net Integrated Service Co., Ltd. 
 ****************************************************************************************/
package com.kingtone.rongji.biz;

import com.kingtone.rongji.R;

/**   
 * @Title:  Comments.java 
 * @author: wenhui.li 
 * @date:   2015-4-16 下午2:04:26   
 */
public class Comments
{
	/*
	"InDate": "\/Date(1417099366963+0800)\/",
    "DisplayOperation": null,
    "FaultsText": "太差劲了，无语了",
    "ImageName": "130613939444888508.jpg",
    "ImproveText": "",
    "Memo": "以后再也不会买了。",
    "MeritText": "没有什么优点",
    "OrderNumber": "714112700003",
    "PresentPoint": 0,
    "PresentPointDisplay": "0分",
    "ProductId": "10050001001",
    "ProductName": "巴布里大馍",
    "Rating": 1,
    "Title": "哎不想说了",
    "UnitPrice": 0.11
    */
	
	private String ProductName = null; //产品名称
	private String ProductId = null; //产品编号
	private String OrderNumber = null; //订单编号
	private String InDate = null;//购买日期
	private double UnitPrice = 0.0;//购买价格
	private String Title = null; //标题
	private String MeritText = null; //优点
	private String FaultsText = null; //缺点
	private String Memo = null; //描述
	
	public String getImageName()
	{
		return ImageName;
	}

	public void setImageName(String imageName)
	{
		ImageName = imageName;
	}

	private int Rating = 0; //级别
	private String ImageName = null;//图片名称
	
	private final static int COMMENTS_LEVEL_GREAT = 5;
	private final static int COMMENTS_LEVEL_GOOD = 4;
	private final static int COMMENTS_LEVEL_NORMAL = 3;
	private final static int COMMENTS_LEVEL_BAD = 2;
	private final static int COMMENTS_POOR = 1;
	private final static int COMMENTS_NORMAL = 0;
	
	
	/*
	 * 根据评价等级获取描述
	 */
	public static String getLevelStr(int rating)
	{
		String str = null;
		switch(rating)
		{
		case COMMENTS_LEVEL_GREAT:
			str = "非常好";
			break;
		case COMMENTS_LEVEL_GOOD:
			str = "还可以";
			break;
		case COMMENTS_LEVEL_NORMAL:
			str = "一般";
			break;
		case COMMENTS_LEVEL_BAD:
			str = "比较差";
			break;
		case COMMENTS_POOR:
			str = "非常差";
			break;
		}
		return str;
	}
	
	public String getProductName()
	{
		return ProductName;
	}

	public void setProductName(String productName)
	{
		ProductName = productName;
	}

	public String getProductId()
	{
		return ProductId;
	}

	public void setProductId(String productId)
	{
		ProductId = productId;
	}

	public String getOrderNumber()
	{
		return OrderNumber;
	}

	public void setOrderNumber(String orderNumber)
	{
		OrderNumber = orderNumber;
	}

	public String getInDate()
	{
		return InDate;
	}

	public void setInDate(String inDate)
	{
		InDate = inDate;
	}

	public double getUnitPrice()
	{
		return UnitPrice;
	}

	public void setUnitPrice(double unitPrice)
	{
		UnitPrice = unitPrice;
	}

	public String getTitle()
	{
		return Title;
	}

	public void setTitle(String title)
	{
		Title = title;
	}

	public String getMeritText()
	{
		return MeritText;
	}

	public void setMeritText(String meritText)
	{
		MeritText = meritText;
	}

	public String getFaultsText()
	{
		return FaultsText;
	}

	public void setFaultsText(String faultsText)
	{
		FaultsText = faultsText;
	}

	public String getMemo()
	{
		return Memo;
	}

	public void setMemo(String memo)
	{
		Memo = memo;
	}

	public int getRating()
	{
		return Rating;
	}

	public void setRating(int rating)
	{
		Rating = rating;
	}

	public static int getLevelDrawable(int rating)
	{
		int drawableId = 0;
		switch(rating)
		{
		case COMMENTS_LEVEL_GREAT:
			drawableId = R.drawable.five_star;
			break;
		case COMMENTS_LEVEL_GOOD:
			drawableId = R.drawable.four_star;
			break;
		case COMMENTS_LEVEL_NORMAL:
			drawableId = R.drawable.three_star;
			break;
		case COMMENTS_LEVEL_BAD:
			drawableId = R.drawable.two_star;
			break;
		case COMMENTS_POOR:
			drawableId = R.drawable.one_star;
			break;
		case COMMENTS_NORMAL:
			drawableId = R.drawable.star;
			break;
		}
		return drawableId;
	}
	
}

